package com.zhongwang.mms.module.buy.dao;
import com.zhongwang.mms.module.buy.model.PlanDetailsModel;
import com.zhongwang.mms.module.buy.model.PlanDetailsOpenModel;
import com.zhongwang.mms.module.buy.model.PurchaseModel;
import com.zhongwang.mms.module.buy.model.Types;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
/**
 * @Description: 提报计划 dao
 * @Author: China.kxx
 * @Date: 2020/4/7 16:28
 */

@Repository
public interface PurchaseDao {


    List<PurchaseModel>purchaseDivision();
    /**
     * @title: purchaseAll
     * @description: 项目采购计划看板 列表
     * @param: [purchaseModel]
     * @return: java.util.List<com.zhongwang.mms.module.buy.model.PurchaseModel>
     * @author: 徐一贺
     * @date: 2020/11/4 9:36
     * @versron: ver 1.0
     */
    List<PurchaseModel> purchaseAll(PurchaseModel purchaseModel);

    /**
     * @title: findProjectCount
     * @description: 项目采购计划看板 列表数量
     * @param: [purchaseModel]
     * @return: java.lang.Integer
     * @author: 徐一贺
     * @date: 2020/11/4 9:44
     * @versron: ver 1.0
     */
    Integer findProjectCount(PurchaseModel purchaseModel);
    /**  purchaseDetails 查询明细页列表
     * @param planDetailsModel 条件
     * @return java.util.List<com.zhongwang.mms.module.buy.model.PlanDetailsModel>
     * @exception
     * @author 徐一贺
     * @date 2020/11/19 14:48
     */
    List<PlanDetailsModel> purchaseDetails(PlanDetailsModel planDetailsModel);
    PlanDetailsModel projectSign(String rppProjectCode);
    PlanDetailsModel projectProduction(String rppProjectCode);
    PlanDetailsModel plannedQuantity(String rppProjectCode);
    List<PlanDetailsOpenModel> alterationOpen(PlanDetailsOpenModel planDetailsOpenModel);
    /**  appointOpen 查看指定库存列表信息
     * @param planDetailsOpenModel 查询条件
     * @return java.util.List<com.zhongwang.mms.module.buy.model.PlanDetailsOpenModel>
     * @author 徐一贺
     * @date 2020/11/19 9:47
     */
    List<PlanDetailsOpenModel> appointOpen(PlanDetailsOpenModel planDetailsOpenModel);
    List<PlanDetailsOpenModel> warehouseOpen(PlanDetailsOpenModel planDetailsOpenModel);
    List<PlanDetailsOpenModel> merPurchasing(PlanDetailsOpenModel planDetailsOpenModel);

    /**
     * 查询分类和数量及总量
     *
     * @param code 类型编码
     * @param rppProjectCode 项目编号
     * @return list
     */
    List<Types> findTypes(@Param("code") Integer code, @Param("rppProjectCode") String rppProjectCode);
    PlanDetailsModel allNum(String rppProjectCode);

    List<PlanDetailsOpenModel> appointPOpen(PlanDetailsOpenModel planDetailsOpenModel);

    //Long purchaseAll_COUNT(PurchaseModel purchaseModel);
}

